﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Baosight.ZNH.ZMCommon;

namespace Baosight.ZNH.ZM.UI
{
    public partial class ZM9M : EFViewCmes
    {
        public ZM9M()
        {
            InitializeComponent();
            this.mine3.DataLoaded += new EventHandler<EventArgs>(mine3_DataLoaded);
            this.grub3.DataLoaded += new EventHandler<EventArgs>(grub3_DataLoaded);
        }

        /// <summary>
        /// 判断是否有四班制的数据，决定是否显示其EFGrid
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void mine3_DataLoaded(object sender, EventArgs e)
        {
            if (!this.EIDataContext.ContainsBlockName("mineResult2"))
            {
                mine4.Visibility = Visibility.Collapsed;
            }
        }

        /// <summary>
        /// 判断是否有四班制的数据，决定是否显示其EFGrid
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void grub3_DataLoaded(object sender, EventArgs e)
        {
            if (!this.EIDataContext.ContainsBlockName("grubResult2"))
            {
                grub4.Visibility = Visibility.Collapsed;
            }
        }
    }
}
